using System;
using System.Collections.Generic;
using System.Text;

namespace BTV.Base
{
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")]
    public abstract class BTVSchedule
    {
        private DateTime _start;
        private TimeSpan _duration;
        private string _pid;
        private string _channel;

        public DateTime StartTime
        {
            get
            {
                return _start;
            }
            set
            {
                _start = value;
            }
        }

        public TimeSpan Duration
        {
            get
            {
                return _duration;
            }
            set{
                _duration = value;
            }
        }

        public string Channel
        {
            get
            {
                return _channel;
            }
            set
            {
                _channel = value;
            }
        }

        public string Pid
        {
            get
            {
                return _pid;
            }
            set
            {
                _pid = value;
            }
        }

        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
        public DateTime GetDay()
        {
            return new DateTime(this._start.Year, this._start.Month, this._start.Day);
        }

        public abstract DateTime EndTime
        {
            get;
        }

        public abstract void SetStartTime(string time);

        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
        public abstract void SetDuration(string duration);

        public override string ToString()
        {
            return Channel + " - " + StartTime.ToString("dddd dd/MM/yy - HH:mm") + " -> " + EndTime.ToString("HH:mm");
        }
    }
}
